using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;

namespace RBAC.Domain.ProcessManagement
{
    /// <summary>
    /// 工艺流程主表
    /// </summary>
    [Table("ProcessFlow")]
    public class ProcessFlow : BaseEntity
    {
        /// <summary>
        /// 工艺流程编号（如：CF-001）
        /// </summary>
        public string? FlowCode { get; set; }

        /// <summary>
        /// 系统编号（页面显示的系统编号）
        /// </summary>
        public string? SystemCode { get; set; }

        /// <summary>
        /// 工艺流程名称
        /// </summary>
        public string? FlowName { get; set; }

        /// <summary>
        /// 工序数量
        /// </summary>
        public int? ProcessCount { get; set; }

        /// <summary>
        /// 负责人用户Id
        /// </summary>
        public long? OwnerUserId { get; set; }

        /// <summary>
        /// 负责人用户名
        /// </summary>
        public string? OwnerUserName { get; set; }

        /// <summary>
        /// 所属部门Id
        /// </summary>
        public long? DepartmentId { get; set; }

        /// <summary>
        /// 所属部门名称
        /// </summary>
        public string? DepartmentName { get; set; }

        /// <summary>
        /// 状态（1=启用，0=禁用）
        /// </summary>
        public int Status { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }

        /// <summary>
        /// 明细集合（加工工序）
        /// </summary>
        public ICollection<ProcessFlowDetail>? Details { get; set; }

        /// <summary>
        /// 附件集合
        /// </summary>
        public ICollection<ProcessFlowAttachment>? Attachments { get; set; }
    }
}
